<?php 
class News_Usenet_Group 
{
    var $Name;
    var $beginAt;
    var $endAt;
    var $Count;
    function News_Usenet_Group($name, $begin, $end)
    { 
        $this->Name    = $name;
        $this->beginAt = min($begin,$end);
        $this->endAt   = max($begin,$end);
        $this->Count   = $this->endAt - $this->beginAt;                
    }
    
    function Serialize()
    {
        return sprintf('<group name="%s" begin="%s" end="%s" count="%s"/>',
            $this->Name,$this->beginAt,$this->endAt,$this->Count);
    }
    
    function Open()
    {
        
    }
}